<!-- 团队历史业绩 -->

<ion-header>
    <ion-toolbar content-page class="fir-toolbar">
        <ion-buttons start>
            <button ion-button icon-only (click)="backButtonClick($event)">
                <i class="toolbar-back"></i>
            </button>
        </ion-buttons>
        <ion-title>团队历史业绩</ion-title>
        <ion-buttons end>
            <button ion-button icon-only adpmenutoggle>
                <i class="toolbar-menu"></i>
            </button>
        </ion-buttons>
    </ion-toolbar>
    <div class="performanceHead">
        <div class="groupTab">
            <span class="oneStepPer" [ngClass]="currentView===0?'active':''" (click)="chooseView(0)">
                直辖组
            </span>
            <span class="moreStepPer" [ngClass]="currentView===1?'active':''" (click)="chooseView(1)">
                所辖组
            </span>
            <span class="switch-sign" [class.sign-change]="currentView === 1"></span>
        </div>
        <div class="groupType">
            <div class="divLeft" *ngIf="currentView === 0">营销员</div>
            <div class="divLeft" *ngIf="currentView === 1">团队<br/>主管</div>
            <span class="typeName">类型</span>
            <span class="thisYear">本年</span>
            <span class="hisTop">历年最高</span>
            <span class="chaju">差距</span>
        </div>
    </div>
</ion-header>

<ion-content>
    <div class="groupList">
        <div class="oneStepGroup">
            <div *ngIf="(!hisPerData || hisPerData.length === 0) && isLoaded" class="no-data">
                <div class="no-data-img"><img src="./assets/images/common/icon_nodata.png"></div>
                <div class="no-data-txt">没有相关数据</div>
            </div>
            <div class="groupItem" (click)="goToMemberPerformance(a.groupId)" *ngFor="let a of hisPerData">
                <div class="leaderName">
                  {{a.chargeName}}
                    <!--<span>-->
                        <!--{{a.chargeLevel}}-->
                    <!--</span>-->
                </div>
                <div class="groupRight">
                    <div class="groRightTop">
                        <span class="title">净PC</span>
                        <span class="fontBigger">{{a.yearPc | numberTrans}}</span>
                        <span class="fontBigger">{{a.topPc| numberTrans}}</span>
                        <span>{{a.pcGap | numberTrans}}</span>
                    </div>
                    <div class="groRightBot">
                        <span class="typeName title">净寿险<br/>件数</span>
                        <span class="fontBigger">{{a.yearLifeInsurance| numberTrans}}</span>
                        <span class="fontBigger">{{a.topLifeInsurance | numberTrans}}</span>
                        <span>{{a.lifeInsGap | numberTrans}}</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <ion-fab bottom right class="go-up">
        <button ion-fab (click)="goUp()" color="light">
            <img class="go-up-icon" src="./assets/images/client/client-list/icon_top.png" alt="">
        </button>
    </ion-fab>
</ion-content>
